package cn.com.dhcc.app.pub.module.sysmgr.service;

/**
 * 排序参数
 *
 */
public class OrderProperty {
	public static final String ASC = "ASC";
	public static final String DESC = "DESC";
	private String orderName;
	private String order;

	public OrderProperty() {
		this.order = ASC;
		this.orderName = "";
	}

	public OrderProperty(String orderName, String order) {
		this.orderName = orderName;
		if (DESC.equalsIgnoreCase(order)) {
			this.order = order;
		} else {
			this.order = ASC;
		}
	}

	public OrderProperty(String orderName) {
		this.orderName = orderName;
		this.order = ASC;
	}

	public String getOrderName() {
		return orderName;
	}

	public void setOrderName(String orderName) {
		this.orderName = orderName;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	@Override
	public String toString() {
		return "OrderProperty [orderName=" + orderName + ", order=" + order + "]";
	}
}
